﻿
using System;
using System.Linq;
using System.Linq.Expressions;
using StevensReceipts.Domain;

namespace StevensReceipts.Repository
{
    public interface IRepository<T> : IDisposable where T: IEntity 
    {
        IQueryable<T> GetAll();

        T GetSingle(Expression<Func<T, bool>> predicate);

        IQueryable<T> Get(Expression<Func<T, bool>>  predicate);

        //T GetById(int id);

        T Add(T entity);

        void Delete(T entity);

        void Update(T entity);

        //void Save();
    }
}